package com.ugoodtech.mdcc.core.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

@ApiModel("报告问卷")
@Entity
@Table(name = "report_red_dot")
public class ReportRedDot extends BaseEntity {

    @ApiModelProperty("红点状态")
    private boolean readed = false;

    @ApiModelProperty("用户")
    private User user;

    @ApiModelProperty("报告")
    private StationReport stationReport;

    @ApiModelProperty("备注")
    private String note;

    @ApiModelProperty("跟进状态")
    private String type;

    @ApiModelProperty("部门ID")
    private Long departmentId;

    @Column(name = "readed")
    public boolean isReaded() {
        return readed;
    }

    @Column(name = "是否已经发送了短信")
    private Integer isSendMsg;

    @ApiModelProperty("是否发送过管理员设置的时间")
    private Integer isAutoMessage = 0;

    public void setReaded(boolean readed) {
        this.readed = readed;
    }

    @ManyToOne
    @JoinColumn(name = "user_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne
    @JoinColumn(name = "report_id")
    public StationReport getStationReport() {
        return stationReport;
    }

    public void setStationReport(StationReport stationReport) {
        this.stationReport = stationReport;
    }

    @Column(name = "note")
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Column(name = "department_id")
    public Long getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
    }

    @Column(name = "is_sendMsg")
    public Integer getIsSendMsg() {
        return isSendMsg;
    }

    public void setIsSendMsg(Integer isSendMsg) {
        this.isSendMsg = isSendMsg;
    }

    @Column(name = "is_autoMsg")
    public Integer getIsAutoMessage() {
        return isAutoMessage;
    }

    public void setIsAutoMessage(Integer isAutoMessage) {
        this.isAutoMessage = isAutoMessage;
    }
}
